package com.hui10.mediaplayer.sigleton;

/**
 * Author: Created by lucus on 2019/5/24.
 * E-mail: mcphilex1989@gmail.com
 * Tel: 15652608401
 * 线程安全的懒汉式单例
 */
public class SafeLazySingleton {

    private SafeLazySingleton() {
    }

    private static SafeLazySingleton safeLazySingleton;

    public static synchronized SafeLazySingleton getInstance() {
        if (safeLazySingleton == null) {
            safeLazySingleton = new SafeLazySingleton();
        }
        return safeLazySingleton;
    }
}
